<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="content-Type" charset="UTF-8">
    <meta http-equiv="x-ua-compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="/staticfiles/bootstrap-3.3.7/css/bootstrap.css">
    <title>编辑作者</title>
</head>
<body>
{% include 'nav.html' %}
<div class="container">
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <div class="page-header">
                <h1>编辑作者</h1>
            </div>
            <form class="form-horizontal" action="/edit_author/{{ edit_id }}" method="post">
            {% csrf_token %}
                <div class="form-group">
                    <label for="author_name" class="col-sm-3 control-label">作者名字</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="author_name" name="author_name" value="{{ author_obj.name }}">
                    </div>
                </div>

                 <div class="form-group">
                    <label for="press_name" class="col-sm-3 control-label">书籍名字</label>
                    <div class="col-sm-9">
                        <select name="book_ids" class="form-control" multiple="multiple">
                        {% for book in book_list %}
                            <option value="{{ book.id }}">{{ book.title }}</option>
                        {% endfor %}
                    </select>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-offset-3 col-sm-9">
                        <button type="submit" class="btn btn-default">确认修改</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>


</body>
</html>